/**
 * Created by Administrator on 2017-11-25
 */
define(function (require, exports, module) {
    'use strict';
    function del(id) {
        console.log(id);
        $('#'+id).hide();
        $.ajax({
            url: '/mine/deleteorder',
            type: 'POST',
            data: {
                id:id,
                userid:user.id
            },
            success: function (res) {
                if (!res.success) {
                    alert(res.msg);
                    return;
                }else{
                    alert('订单已删除！')
                }
            }
        })
    }


    return {
        del:del
    }
})